package com.company;

import java.util.Scanner;

public class demo31 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double x1,y1,x2,y2,distance;
        System.out.println("请输入两个点的坐标：");
        while(sc.hasNext()) {
            x1=sc.nextDouble();
            y1=sc.nextDouble();
            x2=sc.nextDouble();
            y2=sc.nextDouble();
            distance =Math.sqrt(Math.abs((x1 - x2)*(x1 - x2))+Math.abs((y1 - y2)*(y1 - y2)));
            System.out.format("%.3f",distance).println();
        }
    }
}
